<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.io.BufferedInputStream"%>
<%@page import="java.io.OutputStream"%>
<%@page import="java.io.FileInputStream"%>
<%
	String filename = request.getParameter("filename");
	filename = new String(filename.getBytes("iso-8859-1"), "utf-8");
	BufferedInputStream is = null;
	OutputStream os = null;
	try {
		is = new BufferedInputStream(new FileInputStream(filename));
		os = response.getOutputStream();
		byte[] buf = new byte[1024];
		int bytes = 0;
		while ((bytes = is.read(buf)) != -1){
			os.write(buf, 0, bytes);
		}
		os.flush();
		out.clear();  
		out = pageContext.pushBody();  
	} catch (Exception e){
		e.printStackTrace();
	}finally{
		if(is != null) is.close();
		if(os != null) os.close();
	} 
%>
